Skip to content

Conversation

marko-bekhta
Copy link
Member

https://hibernate.atlassian.net/browse/HHH-19716

It doesn't look like wrap() is called by Reactive directly, so it seems safe to update the method, no?


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


Comment on lines 106 to +108
public void onPostRemoveCollection(PostCollectionRemoveEvent event) {
assertThat( event.getAffectedOwnerOrNull() ).isNotNull();
assertThat( event.getCollection().getOwner() ).isNotNull();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want the owner to be non-null after a remove?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that ... idk 🤷🏻 🙂
wouldn't we want to know to what the collection belonged to before it was removed?
My thinking is that event.getAffectedOwnerOrNull() == event.getCollection().getOwner()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're sure this is pre-existing behavior and we don't need to change it to fix the bug, fine by me.

@marko-bekhta marko-bekhta force-pushed the fix/HHH-19716-Collection-event-listeners-may-be-missing-collection-owners-in-the-persistent-collection branch from 2ef4bdd to 23f9fac Compare August 25, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants